<template>
	<view :data-theme="theme()" :class="theme() || ''">
		<diy ref="diy" :storeItem="storeItem" :diyItems="items" :diytop="diytop" @openCategory="openCategory"
			@sideListOpen="sideListOpen" @openSearch="openSearch" @stopPush="stopPush"></diy>
		<!--点击收藏-->
		<view class="collection-box" v-if="is_collection" :style="'top:' + (topBarTop() + topBarHeight() + 10) + 'px;'">
			<view class="inner">
				<text> 点击“</text>
				<text class="point">.</text>
				<text class="point point-big">.</text>
				<text class="point">.</text>
				<text>”添加到我的小程序，\n微信首页下拉即可快速访问店铺 </text>
			</view>
			<button type="primary" class="close-btn" @click="is_collection = false">
				x
			</button>
		</view>


		<!--关注公众号-->
		<!-- #ifdef MP-WEIXIN -->
		<view class="follow-gzh" v-if="is_follow == '1'">
			<text class="icon iconfont icon-guanbi" @click="is_follow = 0"></text>
			<official-account></official-account>
		</view>
		<!-- #endif -->

		<!--首页推送-->
		<Homepush v-if="is_homepush" :homepush_data="homepush_data"></Homepush>
		<searchProduct :isShow="showSearch" @close="closeSearch"></searchProduct>
		<tabBar></tabBar>
		<!-- 背景滚动禁用层 -->
		<view v-if="xpopupOpen" class="no-scroll-overlay" @touchmove.stop.prevent @wheel.stop.prevent></view>

		<!-- 侧边栏 -->
		<uni-popup ref="xpopup" type="left" border-radius="10px 10px 0 0" @change="onPopupChange">
			<view class="sidepopup">
				<scroll-view scroll-y="true" :style="{height: '100vh', paddingBottom: '20px'}">
					<view class="more">
						更多</view>

					<view v-for="(item,index) in itemsList" :key="index" class="list"
						:style="
						{'margin-bottom': item.ismore && !isClose? '0':'16rpx',
						'border-bottom-left-radius':item.ismore && !isClose ? '0':'24rpx','border-bottom-right-radius':item.ismore && !isClose? '0':'24rpx'}">

						<view class="list-view" @click="selectListChange(item)">
							<view style="display: flex;">
								<image :src="item.icon" class="img"></image>
								<text class="_text">{{item.title}}</text>
							</view>
							<view v-if="item.ismore" style="margin-right: 20rpx;">
								<image style="width: 24rpx;height: 24rpx;" :src="isClose?item.openUrl:item.closeUrl">
								</image>
							</view>

						</view>

					</view>

					<view v-if="!isClose">
						<view v-for="(item,index) in centerList" :key="index" class="more-list" @click="centerCell(item)"
							:style="{'border-bottom-left-radius':item.isRadius? '24rpx':'0','border-bottom-right-radius':item.isRadius? '24rpx':'0'}">
							<view class="list-view">
								<view style="display: flex;margin-left: 30rpx;">
									<image :src="item.icon" class="img"></image>
									<text class="_text">{{item.title}}</text>
								</view>

							</view>

						</view>
					</view>

				</scroll-view>

			</view>
		</uni-popup>

		<!-- 选择商家 -->
		<uni-popup ref="centerpopup" type="center" border-radius="10px 10px 0 0" @change="onPopupChange">
			<view>
				<view class="centerpopup">
					<view class="popup-title">选择商家</view>

					<scroll-view scroll-x="true" @scroll="" class="popup-scroll">

						<view class="scr-view">
							<view v-for="(item,index) in storeList" :key="index" class="cell-view"
								@click="selectStore(item)">
								<image class="cell-image"
									:style="{border: shopSupplierId == item.shopSupplierId ? '2rpx solid #FF2442': '2rpx solid #FFFFFF'}"
									:src="item.logoFilePath"></image>
								<image src="/static/big_v.png" class="cell-bigv"></image>
								<text :style="{color: shopSupplierId == item.shopSupplierId ? '#FF2442':'#333333'}"
									class="cell-text">{{item.name}}</text>


							</view>

						</view>


					</scroll-view>

					<!-- 按钮 -->
					<view class="button-view">
						<view class="cancel-btn common-btn" @click="popCancel">取消</view>
						<view class="sure-btn common-btn" @click="popSure">确认</view>
					</view>

				</view>


			</view>


			<!-- 关闭按钮 -->

			<view class="popup-close-btn" @click="closeClick">
				<image class="close-image" src="/static/business_close.png"></image>
			</view>

		</uni-popup>

	</view>
</template>

<script>
	import diy from "@/components/diy/diy.vue";
	import Homepush from "./home-push/home-push.vue";
	import searchProduct from "@/components/searchProduct.vue";
	import uniPopup from "@/uni_modules/uni-popup/components/uni-popup/uni-popup.vue";
	//#ifdef H5
	import jweixin from "weixin-js-sdk";
	//#endif
	export default {
		components: {
			diy,
			Homepush,
			searchProduct,
			uniPopup,
		},
		data() {
			return {
				itemsList: [{
					title: '切换店铺',
					icon: '/static/more_icon/more_store.png'
				}, {
					title: '购物车',
					icon: '/static/more_icon/more_cart.png'
				}, {
					title: '扫一扫',
					icon: '/static/more_icon/more_scan.png'
				}, {
					title: '我的评论',
					icon: '/static/more_icon/more_comment.png'
				}, {
					title: '帮助和客服',
					icon: '/static/more_icon/more_help.png'
				}, {
					title: '投诉',
					icon: '/static/more_icon/more_complaint.png'
				}, {
					title: '联系平台',
					icon: '/static/more_icon/more_platform.png'
				}, {
					title: '设置',
					icon: '/static/more_icon/more_set.png'
				}, {
					title: '个人中心',
					icon: '/static/more_icon/more_center.png',
					ismore: true,
					openUrl: '/static/more_icon/more_open.png',
					closeUrl: '/static/more_icon/more_close.png'
				}],
				centerList: [{
					title: '我的余额',
					icon: '/static/more_icon/more_balance.png'
				}, {
					title: '我的积分',
					icon: '/static/more_icon/more_points.png'
				}, {
					title: '我的订单',
					icon: '/static/more_icon/more_order.png'
				}, {
					title: '我的钱包',
					icon: '/static/more_icon/more_wallet.png'
				}, {
					title: '商品收藏',
					icon: '/static/more_icon/more_collect.png'
				}, {
					title: '浏览记录',
					icon: '/static/more_icon/more_browse.png'
				}, {
					title: '销售入口',
					icon: '/static/more_icon/more_sell.png'
				}, {
					title: '管理入口',
					icon: '/static/more_icon/more_manage.png'
				}, {
					title: '收货地址',
					icon: '/static/more_icon/more_address.png'
				}, {
					title: '会员权益',
					icon: '/static/more_icon/more_vip.png'
				}, {
					title: '积分商城',
					icon: '/static/more_icon/more_shop.png'
				}, {
					title: '我的优惠券',
					icon: '/static/more_icon/more_coupon.png'
				}, {
					title: '分销中心',
					icon: '/static/more_icon/more_distribution.png'
				}, {
					title: '分销员申请',
					icon: '/static/more_icon/more_distributor_application.png'
				}, {
					title: '联系商家',
					icon: '/static/more_icon/more_merchant.png'
				}, {
					title: '选品中心',
					icon: '/static/more_icon/more_select_center.png'
				}, {
					title: '我的选品',
					icon: '/static/more_icon/more_myselect.png'
				}, {
					title: '平台总管理',
					icon: '/static/more_icon/more_platform_manage.png'
				}, {
					title: '邀请海报',
					icon: '/static/more_icon/more_poster.png',
					isRadius: true
				}],

				isClose: false, // 默认关闭
				storeList: [],
				shopSupplierId: '', // 选择的店铺id
				loading: true,
				/*是否正在加载*/
				loadding: true,
				/*手机高度*/
				phoneHeight: 0,
				/*可滚动视图区域高度*/
				scrollviewHigh: 0,
				background: "",
				listData: [],
				indicatorDots: true,
				autoplay: true,
				interval: 2000,
				duration: 500,
				items: [],
				/*收藏引导*/
				is_collection: false,
				/*关注*/
				is_follow: "0",
				/*是否首页推送*/
				is_homepush: false,
				/*首页推送数据*/
				homepush_data: {},
				target: 0,
				thisindex: 0,
				categoryList: [],
				product_list: [],
				page: 1,
				last_page: 0,
				no_more: false,
				title_name: "",
				title_type: "text",
				bgcolor: "",
				url: "",
				jweixin: null,
				toplogo: "",
				titleTextColor: "",
				diytop: 0,
				showSearch: false,
				searchIconTxt: '',
				rightSearch: '',
				homeShare: {},
				share_img: '',
				openCategoryConfig: {
					color: "#000000",
					open: 0,
				},
				xpopupOpen: false,
				scrollTop: 0,
				storeItem: {} // 店铺信息
			};
		},

		onReady() {
			uni.hideTabBar();
		},
		/*分享当前页面*/
		onShareAppMessage() {
			let self = this;
			return {
				title: self.homeShare.shareTitle,
				path: '/pages/index/index?' + self.getShareUrlParams(),
				imageUrl: self.homeShare.shareImg
			};
		},
		onShow() {
			this.getTabBarLinks();
			// this.getsign();

			const name = uni.getStorageSync('name')
			const logoFilePath = uni.getStorageSync('logoFilePath')
			this.storeItem = {
				name,
				logoFilePath
			}

		},
		onTabItemTap() {
			//#ifdef H5
			if (process.env.NODE_ENV === "production") {
				window.location.href =
					config.app_url + config.h5_addr + "/pages/index/index";
			}
			//#endif
		},
		onLoad(e) {
			let self = this;
			if (e.invitationId) {
				uni.setStorageSync('invitationId', e.invitationId);
			}
			if (e.refereeId) {
				uni.setStorageSync('refereeId', refereeId);
			}
			//#ifdef H5
			if (this.isWeixin()) {
				this.url = window.location.href;
			}
			//#endif
			this.getData();
			// this.getTabbar();
		},
		onPullDownRefresh() {
			this.toggleInit();
		},
		onReachBottom() {
			this.$refs.diy.scrolltolowerFunc();
			console.log("到底了");
		},
		onPageScroll(e) {
			this.diytop = e.scrollTop;
		},
		mounted() {

		},
		methods: {
			// 关闭
			closeClick() {
				this.$refs.centerpopup.close()
			},
			// 选择店铺
			selectStore(item) {

				this.storeItem = item
				this.shopSupplierId = item.shopSupplierId

			},
			getBusinessList() {
				let self = this;
				self._postBody("supplier/index/shopList", {
					appId: 1001
				}, function(res) {
					console.log(res)
					self.storeList = res.data;
				})
			},

			popCancel() {
				this.$refs.centerpopup.close()
			},
			popSure() {
				console.log(this.storeItem)
				uni.setStorageSync('shopId', this.storeItem.shopSupplierId);
				uni.setStorageSync('name', this.storeItem.name);
				uni.setStorageSync('logoFilePath', this.storeItem.logoFilePath)

				uni.showToast({
					title: '店铺切换成功',
					icon: 'none'
				})

				this.$refs.centerpopup.close()
				this.getData();
			},

			selectListChange(event) {
				if (event.title == '切换店铺') {
					this.$refs.centerpopup.open('center')
					this.getBusinessList()
				} else if (event.title == '购物车'){
					this.$refs.xpopup.close()
					uni.switchTab({
						url:'/pages/cart/cart'
					})
				}else if (event.title == '扫一扫'){
					uni.showToast({
						title:'正在建设中',
						icon:'none'
					});
				}else if (event.title == '我的评论'){
					this.$refs.xpopup.close()
					uni.navigateTo({
						url:'/pages/user/evaluate/list'
					})
				}else if (event.title == '帮助和客服'){
					
				}else if (event.title == '投诉'){
					
				}else if (event.title == '联系平台'){
					
				}else if (event.title == '设置'){
					this.$refs.xpopup.close()
					uni.navigateTo({
						url:'/pages/user/set/set'
					})
				}
				
				
				else if (event.title == '个人中心') {
					this.isClose = !this.isClose
				}
			},
			// 个人中心选择项点击
			centerCell(event){
				this.$refs.xpopup.close()
				 if (event.title == '我的余额'){
					uni.navigateTo({
						url:'/pages/user/my-wallet/my-wallet'
					})
				}else if (event.title == '我的积分'){
					uni.navigateTo({
						url:'/pages/user/points/points'
					})
					
				}else if (event.title == '我的订单'){
					uni.navigateTo({
						url:'/pages/order/myorder'
					})
				}else if (event.title == '我的钱包'){
					uni.navigateTo({
						url:'/pages/user/my-wallet/my-wallet'
					})
				}else if (event.title == '商品收藏'){
					uni.navigateTo({
						url:'/pages/user/favorite/favorite'
					})
				}else if (event.title == '浏览记录'){
					uni.showToast({
						title:'正在建设中',
						icon:'none'
					});
				}else if (event.title == '销售入口'){
					uni.navigateTo({
						url:'/pages/order/myorder'
					})
				}else if (event.title == '管理入口'){
					uni.navigateTo({
						url:'/pages/user/my_shop/my_shop'
					})
				}else if (event.title == '收货地址'){
					uni.navigateTo({
						url:'/pages/user/address/address'
					})
				}else if (event.title == '会员权益'){
					uni.navigateTo({
						url:'/pages/card/index'
					})
				}else if (event.title == '积分商城'){
					uni.navigateTo({
						url:'/pagesPlus/points/list/list'
					})
				}else if (event.title == '我的优惠券'){
					uni.navigateTo({
						url:'/pages/user/my-coupon/my-coupon'
					})
				}else if (event.title == '分销中心'){
					uni.navigateTo({
						url:'/pages/order/myorder'
					})
				}else if (event.title == '分销员申请'){
					uni.navigateTo({
						url:'/pages/agent/apply/newApply'
					})
				}else if (event.title == '联系商家'){
					uni.navigateTo({
						url:'/pages/order/myorder'
					})
				}else if (event.title == '选品中心'){
					uni.navigateTo({
						url:'/pages/order/myorder'
					})
				}else if (event.title == '我的选品'){
					uni.navigateTo({
						url:'/pages/order/myorder'
					})
				}else if (event.title == '平台总管理'){
					uni.navigateTo({
						url:'/pages/order/myorder'
					})
				}else if (event.title == '邀请海报'){
					uni.navigateTo({
						url:'/pages/order/myorder'
					})
				}
			},
			
			open() {
				this.$nextTick(() => {
					this.$refs.xpopup && this.$refs.xpopup.open('left');
				});
			},
			onPopupChange(e) {
				this.xpopupOpen = !!(e && e.show);
			},

			stopPush() {
				uni.stopPullDownRefresh();
			},
			openSearch(e) {
				if (e) {
					this.showSearch = true;
				}
			},

			openCategory(e) {
				// uni.navigateTo({
				// 	url:'/pages/product/category2'
				// })

				// uni.switchTab({
				// 	url:'/pages/product/category'
				// })
			},

			sideListOpen(e) {

				this.open()
			},
			onRefresh() {},
			getsign() {
				let self = this;
				// #ifdef H5
				console.log(123456789);
				self._postBody(
					"index/getSignPackage", {
						url: self.url,
						paySource: self.getPlatform(),
					},
					function(res) {
						self.signPackages = res.data.signPackage;
						// 配置微信扫一扫参数
						//#ifdef H5
						if (self.url != "") {
							console.log(self.signPackages, "signpacages123");
							self.jweixin = self.configWxScan(self.signPackages);
						}
						//#endif
						uni.hideLoading();
					}
				);
				// #endif
			},
			/*获取首页分类*/
			getData() {
				let self = this;
				uni.showLoading({
					title: "加载中",
				});
				self._get(
					"index/index", {
						url: self.url,
					},
					function(res) {
						let page = res.data.page;
						self.items = page.items;
						self.homeShare = res.data.page.page.params;
						self.setPage(page.page);
						//弹出收藏
						// #ifdef  MP-WEIXIN
						let isFirst = uni.getStorageSync("isFirst");
						if (isFirst == "" && res.data.setting.collection.status == "1") {
							self.is_collection = true;
							uni.setStorageSync("isFirst", 1);
						}
						self.is_follow = res.data.setting.officia.status;
						// #endif
						// 首页推送
						let homepush_name = uni.getStorageSync("homepush_name");
						if (
							res.data.setting.homepush.isOpen &&
							homepush_name != res.data.setting.homepush.name
						) {
							self.homepush_data = res.data.setting.homepush;
							self.is_homepush = true;
						}
						// 配置微信扫一扫参数
						//#ifdef H5
						if (self.url != '') {
							// self.jweixin = self.configWxScan(res.data.signPackage);
							let params = {};
							self.configWx(res.data.share.signPackage, res.data.share.shareParams, params);
						}
						//#endif
						uni.hideLoading();
						self.loadding = false;
						uni.stopPullDownRefresh();
					}
				);
			},
			/*获取数据*/
			getList() {
				let self = this;
				self._get("product/category/index", {}, function(res) {
					self.categoryList = res.data.list;
					let fistIndex = {
						name: "推荐",
						categoryId: "0",
					};
					self.categoryList.unshift(fistIndex);
				});
			},
			/*获取数据*/
			getProduct() {
				let self = this;
				let page = self.page;
				self.loading = true;
				self._postBody(
					"product/product/lists", {
						pageIndex: page || 1,
						categoryId: self.categoryId,
						search: "",
						sortType: "all",
						sortPrice: 0,
						pageSize: 20,
					},
					function(res) {
						self.loading = false;
						uni.stopPullDownRefresh();
						self.product_list = self.product_list.concat(res.data.records);
						self.last_page = res.data.lastPage;
						if (res.data.lastPage <= 1) {
							self.no_more = true;
						}
					}
				);
			},
			/*可滚动视图区域到底触发*/
			scrolltolowerFunc() {
				let self = this;
				if (self.page < self.last_page) {
					self.page++;
					self.getProduct();
				}
				self.no_more = true;
			},
			/*设置页面*/
			setPage(page) {
				uni.setNavigationBarTitle({
					title: page.params.name,
				});
				let colors = "#000000";
				uni.setNavigationBarColor({
					frontColor: colors,
					backgroundColor: "#ffffff",
				});
			},
			// 滑動切换触发的事件
			toggle(e) {
				let index = e.detail.current;
				this.target = index;
				this.categoryId = this.categoryList[index].categoryId;
				this.toggleInit();
				if (index != 0) {
					this.getProduct();
				}
			},
			toggleInit() {
				this.page = 1;
				this.last_page = 0;
				this.no_more = false;
				this.product_list = [];
			},
			scroll(e) {
				this.diytop = e.detail.scrollTop;
			},
			//点击nav控制下面的展示
			setIndex(e) {
				this.thisindex = e;
			},
			/*分享当前页面*/
			onShareAppMessage() {
				let self = this;
				return {
					title: self.title_name,
					path: "/pages/index/index?" + self.getShareUrlParams(),
				};
			},
			/* 禁止手动滑动 */
			stopTouchMove() {
				return true;
			},
			/*扫一扫核销*/
			scanQrcode: function() {
				let self = this;
				//#ifdef H5
				// 只允许通过相机扫码
				self.jweixin.scanQRCode({
					needResult: 1,
					scanType: ["qrCode", "barCode"],
					success: function(res) {
						self.gotoPage("/pages/store/clerkorder?orderNo=" + res.resultStr);
					},
					error: function(res) {
						uni.showToast({
							title: "扫码失败，请重试",
						});
					},
				});
				//#endif
				//#ifndef H5
				// 只允许通过相机扫码
				uni.scanCode({
					onlyFromCamera: true,
					success: function(res) {
						if (res.errMsg == "scanCode:ok") {
							self.gotoPage("/pages/store/clerkorder?orderNo=" + res.result);
						} else {
							uni.showToast({
								title: "扫码失败，请重试",
							});
						}
					},
				});
				//#endif
			},
			/* 关闭搜索 */
			closeSearch() {
				this.showSearch = false;
			},
			getTabbar() {
				let self = this;
				console.log("自定义", uni.getStorageSync("TabBar").isAuto);
				if (
					!uni.getStorageSync("TabBar").isAuto ||
					uni.getStorageSync("TabBar").isAuto == 0
				) {
					let theme = uni.getStorageSync("theme");
					if (theme) {
						let color = [
							"#ff5704",
							"#19ad57",
							"#ffcc00",
							"#1774ff",
							"#e4e4e4",
							"#c8ba97",
							"#623ceb",
						];
						uni.setTabBarStyle({
							color: "#333333",
							selectedColor: color[theme],
						});
						uni.setTabBarItem({
							index: 0,
							text: "首页",
							iconPath: "/static/tabbar/home.png",
							selectedIconPath: "/static/tabbar/home_" + theme + ".png",
						});
						uni.setTabBarItem({
							index: 1,
							text: "分类",
							iconPath: "/static/tabbar/category.png",
							selectedIconPath: "/static/tabbar/category_" + theme + ".png",
						});
						uni.setTabBarItem({
							index: 2,
							text: "购物车",
							iconPath: "/static/tabbar/cart.png",
							selectedIconPath: "/static/tabbar/cart_" + theme + ".png",
						});
						uni.setTabBarItem({
							index: 3,
							text: "我的",
							iconPath: "/static/tabbar/user.png",
							selectedIconPath: "/static/tabbar/user_" + theme + ".png",
						});
					} else {
						setTimeout(function() {
							self.getTabbar();
						}, 3000);
					}
				}
			},
		},
	};
</script>

<style lang="scss">
	$footer-tabBar-height: 50px;

	.head_top {
		width: 100%;
		height: var(--status-bar-height);
	}

	.index_log {
		// width: 130rpx;
		min-height: 48rpx;
		line-height: 48rpx;
		font-size: 26rpx;
		font-weight: 800;
		color: #FFFFFF;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.index_log image {
		width: 130rpx;
		height: 48rpx;
	}

	.top_search {
		/* width: 380rpx; */
		height: 60rpx;
		line-height: 60rpx;
		background: #f7f7f7;
		border-radius: 30rpx 0 0 30rpx;
		font-size: 30rpx;
		margin-left: 10rpx;
		color: #999;

	}

	.top_search.search-wx {
		// width: 300rpx;
		flex: 1;
	}

	.top_search.special {
		width: 100%;
		border-right: none;
	}


	.top_search_right {
		background: #f7f7f7;
		border-radius: 0 30rpx 30rpx 0;
		height: 60rpx;
		position: relative;
		border: none;
		box-sizing: border-box;
	}

	.top_search_right::before {
		content: ' ';
		width: 1rpx;
		height: 20rpx;
		background-color: #999;
		left: 0;
		top: 0;
		bottom: 0;
		margin: auto;
		position: absolute;
	}

	.top_search_right .icon-saoyisao1 {
		padding: 0 20rpx;
		flex-shrink: 0;
	}

	.top_search .icon-sousuo {
		font-size: 30rpx;
		color: #999;
		margin-left: 20rpx;
		margin-right: 10rpx;
	}

	.top_bg {
		position: absolute;
		top: 0;
		z-index: 0;
		width: 750rpx;
		height: 350rpx;
	}

	.top_bg image {
		width: 750rpx;
		height: 350rpx;
	}

	.nuter {
		width: 100%;
		height: 80rpx;
		line-height: 80rpx;
		display: flex;
		justify-content: space-around;
		font-size: 35rpx;
		padding-bottom: 10rpx;
	}

	.nuter view {
		flex: 1;
		font-size: 30rpx;
		text-align: center;
		transition: all 0.5s ease .1s;
	}

	swiper {
		height: 80vh;
		width: 100%;
		overflow: hidden;
	}

	.swiper-item {
		overflow-y: scroll;
		width: 100%;
		height: 99%;
		box-sizing: border-box;
	}

	.foot_ {
		height: 98rpx;
		width: 100%;
	}

	.banner {
		height: 240upx;
		width: 710upx;
	}

	.banner image {
		width: 710rpx;
		height: 240rpx;
	}

	.new-people .group-bd {
		display: flex;
		justify-content: space-between;
	}

	.new-people .list {
		padding-right: 30rpx;
	}

	.new-people .list .item {
		width: 180rpx;
		text-align: center;
	}

	.new-people .list .price {
		font-size: 24rpx;
	}

	.new-people .list .price .num {
		font-size: 34rpx;
		font-weight: bold;
	}

	.new-people .list button {
		font-size: 24rpx;
		background: #6170ff;
	}

	.new-people .list image {
		width: 180rpx;
		height: 180rpx;
		border: 1px dashed #cccccc;
	}

	.new-people .other {
		width: 230rpx;
	}

	.new-people .other image {
		width: 100%;
	}

	.group-seckill .left .iconfont {
		margin-right: 8rpx;
		color: $dominant-color;
		font-size: 40rpx;
	}

	.group-seckill .list .item {
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
		align-items: center;
		width: 150rpx;
		height: 230rpx;
		border: 1px dashed #cccccc;
	}

	.group-seckill .list text {
		line-height: 60rpx;
		color: $dominant-color;
	}

	.group-seckill .list image {
		width: 150rpx;
		height: 150rpx;
	}

	.group-hd .datetime .time {
		padding: 4rpx;
		background: $dominant-color;
		color: #ffffff;
		border-radius: 4rpx;
	}

	.group-hd .datetime .point {
		padding: 0 10rpx;
		color: $dominant-color;
	}

	.every-day-hard .list .item {
		width: 200rpx;
	}

	.every-day-hard .list image {
		width: 200rpx;
		height: 200rpx;
	}

	.every-day-hard .list .pic {
		position: relative;
		width: 200rpx;
		height: 200rpx;
		border: 1px dashed #cccccc;
	}

	.every-day-hard .list .tips {
		position: absolute;
		left: -1px;
		bottom: -1px;
		padding: 0 10rpx;
		display: flex;
		justify-content: flex-start;
		align-items: center;
		border-radius: 0 4rpx 0 0;
		color: #ffffff;
		background: #ff8a00;
		font-size: 22rpx;
	}

	.every-day-hard .list .tips .iconfont {
		margin-right: 6rpx;
		font-size: 24rpx;
		color: #ffffff;
	}

	.every-day-hard .list .tips .svg-icon {
		width: 20rpx;
		height: 20rpx;
		margin-right: 6rpx;
		color: #ffffff;
	}

	.every-day-hard .list .bottom-box {
		display: flex;
		height: 80rpx;
		justify-content: space-between;
		align-items: center;
	}

	.every-day-hard .list .bottom-box .people {
		font-size: 24rpx;
		color: #fb8138;
	}

	.every-day-hard .list .bottom-box .unit {
		font-size: 22rpx;
		color: $dominant-color;
	}

	.every-day-hard .list .bottom-box .price {
		font-size: 30rpx;
		color: $dominant-color;
	}

	.collection-box {
		position: fixed;
		width: 380rpx;
		padding: 20rpx;
		top: 20rpx;
		right: 20rpx;
		line-height: 40rpx;
		font-size: 24rpx;
		border-radius: 16rpx;
		background: #ffffff;
		border: 1px solid #eeeeee;
		box-shadow: 0 0 6rpx 0 rgba(0, 0, 0, 0.08);
		z-index: 100;
	}

	.collection-box::after {
		position: absolute;
		content: '';
		display: block;
		right: 140rpx;
		top: -15rpx;
		transform: rotate(45deg);
		width: 30rpx;
		height: 30rpx;
		transform: rotate;
		background: #ffffff;
		border-left: 1px solid #eeeeee;
		border-top: 1px solid #eeeeee;
	}

	.collection-box .point {
		width: 20rpx;
		height: 20rpx;
		font-size: 60rpx;
		line-height: 0;
		color: #666666;
	}

	.collection-box .point-big {
		font-size: 80rpx;
	}

	.collection-box .close-btn {
		position: absolute;
		padding: 0;
		right: 10rpx;
		top: 10rpx;
		width: 40rpx;
		height: 40rpx;
		line-height: 30rpx;
		background: #ffffff;
		color: #999999;
		border-radius: 50%;
	}

	.follow-gzh {
		position: fixed;
		left: 0;
		right: 0;
		bottom: calc($footer-tabBar-height + env(safe-area-inset-bottom));
		border-radius: 16rpx;
		box-shadow: 0 0 20rpx 0 rgba(0, 0, 0, 0.1);
		background: #ffffff;
		z-index: 10;
	}

	.follow-gzh .iconfont {
		display: block;
		position: absolute;
		right: 10rpx;
		top: 10rpx;
		z-index: 99;
	}

	.product_item.product_item_right {
		margin-left: 0;
	}

	.product_item .pro_name {
		height: 68rpx;
		line-height: 34rpx;
	}

	.diy-seckillProduct .sharpproduct-head .datetime::v-deep .box {
		padding: 4rpx 10rpx;
		font-size: 22rpx;
		background: #ffebeb;
		color: #f6220c;
	}

	.bargainProduct-head .datetime::v-deep .box {
		padding: 4rpx 10rpx;
		font-size: 22rpx;
		background: #ffffff;
		color: #4b30ff;
	}

	.chat {
		width: 40rpx;
		height: 40rpx;
	}

	.newsnum {
		position: absolute;
		top: -8rpx;
		right: -16rpx;
		z-index: 100;
		border-radius: 50%;
		width: 25rpx;
		height: 25rpx;
		text-align: center;
		line-height: 25rpx;
		color: #ffffff;
		background-color: #ff6633;
		padding: 5rpx;
		font-size: 20rpx;
	}

	.wx-top-right {
		width: 200rpx;
		height: 2rpx;
	}

	.no-scroll-overlay {
		position: fixed;
		left: 0;
		right: 0;
		top: 0;
		bottom: 0;
		z-index: 98; // lower than popup's 99 to allow interaction with popup but block background
		background: transparent;
	}

	.sidepopup {
		width: 620rpx;
		height: 100vh;
		background-color: #f5f5f5;
		overflow: hidden;
		position: relative;

		.more {
			font-size: 42rpx;
			font-weight: 600;
			margin-top: 120rpx;
			margin-left: 26rpx;
			margin-bottom: 32rpx;
		}

		.list {
			background-color: white;
			border-top-left-radius: 24rpx;
			border-top-right-radius: 24rpx;
			height: 112rpx;
			margin-left: 24rpx;
			margin-right: 24rpx;
			transform: translateZ(0);
			-webkit-transform: translateZ(0);

			.list-view {
				display: flex;
				flex-direction: row;
				align-items: center;
				justify-content: space-between;
				height: 112rpx;

				.img {
					width: 40rpx;
					height: 40rpx;
					margin-left: 38rpx;
					margin-right: 20rpx;
				}

				._text {
					font-size: 28rpx;
					color: #333333;
				}
			}
		}

		.more-list {
			height: 100rpx;
			margin-left: 24rpx;
			margin-right: 24rpx;
			background-color: white;

			.list-view {
				display: flex;
				flex-direction: row;
				align-items: center;
				height: 100rpx;

				.img {
					width: 40rpx;
					height: 40rpx;
					margin-left: 38rpx;
					margin-right: 20rpx;
				}

				._text {
					font-size: 28rpx;
					color: #333333;
				}
			}
		}


	}

	/* 覆盖 uni-popup 的默认 z-index，确保弹窗在导航栏之上 */
	:deep(.uni-popup) {
		z-index: 101 !important;
	}

	:deep(.uni-popup .uni-popup__wrapper) {
		z-index: 101 !important;
	}


	/* 选择商家 */
	.centerpopup {
		display: flex;
		flex-direction: column;
		width: 578rpx;
		height: 512rpx;
		border-radius: 32rpx;
		background: linear-gradient(180deg, #FFF1F3 0%, #FFFFFF 100%);
		box-shadow: 0rpx 8rpx 24rpx 0rpx rgba(0, 0, 0, 0.1);

		.popup-title {
			font-size: 32rpx;
			font-weight: 500;
			color: #333333;
			margin-top: 40rpx;
			width: 578rpx;
			text-align: center;
			margin-bottom: 48rpx;
		}

		.popup-scroll {
			white-space: nowrap;
			width: 100%;

			.scr-view {
				display: flex;

				.cell-view {
					width: 120rpx;
					margin-left: 60rpx;
					display: flex;
					flex-direction: column;
					align-items: center;

					.cell-image {
						width: 120rpx;
						height: 120rpx;
						margin-bottom: 16rpx;
						border-radius: 60rpx;
						border: 2rpx solid;
					}

					.cell-bigv {
						width: 28rpx;
						height: 28rpx;
						margin-top: 100rpx;
						margin-right: -30px;
						position: fixed;
					}

					.cell-text {
						font-size: 28rpx;
					}

				}
			}


		}


		.button-view {
			margin-top: 82rpx;
			display: flex;
			flex-direction: row;
			justify-content: center;

			.cancel-btn {
				color: #FF2442;
				background: #FEEDEA;
			}

			.sure-btn {
				color: white;
				background: #FF2442;
				margin-left: 24rpx;

			}

			.common-btn {
				width: 203rpx;
				height: 80rpx;
				border-radius: 12rpx;
				display: flex;
				align-items: center;
				justify-content: center;
				font-size: 32rpx;
			}

		}



	}

	/* 关闭按钮 */
	.popup-close-btn {
		margin-top: 40rpx;
		display: flex;
		justify-content: center;

		.close-image {
			width: 48rpx;
			height: 48rpx;
		}
	}
</style>